package com.feiyi.app.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.feiyi.app.R;
import com.feiyi.app.bean.CheckOrderBean;
import com.feiyi.app.glideutils.GlideImgManager;

import java.util.List;

/**
 * @author wangliantao
 * @time 2018 12 2018/12/9 10:18 PM
 * @email 1346947404@qq.com
 * @package com.feiyi.app.adapter
 * @describe： In me the tiger sniffs the rose
 */
public class CheckOrderAdapter extends BaseQuickAdapter<CheckOrderBean.DataBean.GoodsListBean,BaseViewHolder> {


    public CheckOrderAdapter(int layoutResId, @Nullable List<CheckOrderBean.DataBean.GoodsListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CheckOrderBean.DataBean.GoodsListBean item) {
        ImageView imageView = helper.getView(R.id.iv_checkorder_pic);
        helper.setText(R.id.tv_checkorder_intro,item.getGoods_name())
                .setText(R.id.tv_checkorder_price,item.getFormated_goods_price());
        GlideImgManager.loadImage(mContext,item.getThumb(),imageView);
//        imageView.setImageResource(R.mipmap.ic_launcher);
    }
}
